home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nautilus 1994 April
/
Nautilus CD Magazine Volume 4-4 April 1994 Windows Edition.mdf
/
setup
/
nautcd
/
link
/
connect.scr
next >
Wrap
Text File
|
1993-08-18
|
7KB
|
317 lines
!
! Copyright (c) 1993
! by CompuServe Incorporated, Columbus, Ohio
!
! The information in this software is subject to change without
! notice and should not be construed as a commitment by CompuServe.
!
! CONNECT:
! Handles CompuServe and Direct.
!
! NOTE: It is recommended that the numeric codes for networks NOT be
! modified since other utility programs may assume the relationships
! of network names and network ids specified below.
!
!+V
! "3.1"
!-V
!+N
CompuServe = 1; ! "CompuServe"
AlaskaNet = 20; ! "AlaskaNet"
CompuPass = 13; ! "CompuPass"
CSIRnet = 16; ! "CSIR-Net"
DataPac = 4; ! "DataPac"
Datapak = 25; ! "Datapak (S)"
Datex_J = 19; ! "Datex-J"
Datex_P = 10; ! "Datex-P"
FALNET = 14; ! "FALNET"
FENICSII = 24; ! "FENICS II"
Dialplus = 11; ! "GNS Dialplus"
InfoNet_Europe = 5; ! "InfoNet-Euro"
InfoNet_World = 6; ! "InfoNet-Wrld"
ISRAKAV = 17; ! "ISRAKAV"
LATA = 7; ! "LATA"
CTLATA = 8; ! "LATA-Ct"
Mercury = 15; ! "Mercury"
NIF = 12; ! "NIFTY LL"
PacNet = 21; ! "PacNet"
Telenet = 2; ! "SprintNet"
Telepac = 9; ! "Telepac"
Transpac = 18; ! "Transpac"
TTNNet = 22; ! "TTN-Net"
Tymnet = 3; ! "Tymnet"
VNZNET = 23; ! "VNZ-Net"
Direct = 26; ! "Direct"
!-N
define %CR = "^M";
define %FALSE = 0;
define %TRUE = 1;
hangup = 1;
UsingModem = %FALSE;
CISNetwork = %FALSE;
!
! Main Program
!
init %Port, %BaudRate;
if %_init goto Continue_Connect;
define %FailureMsg = "Could not initialize port";
goto Connect_Fatal;
Continue_Connect:
call %Dir & "first.scr" () : Result;
if Result = %Cancel goto Cancel_Connect;
if Result = %Failure goto Connect_Failure;
if Result = %Fatal goto Connect_Fatal;
on cancel goto Cancel_Connect;
DirectConnect = (%Network = Direct) or (%DialType = 2);
if DirectConnect goto Connect_CIS;
call %Dir & "phone.scr" () : Result;
if Result = %Cancel goto Cancel_Connect;
if Result = %Failure goto Connect_Failure;
if Result = %Fatal goto Connect_Fatal;
UsingModem = %TRUE;
if %Network = CompuServe goto Connect_CIS;
if %Network = Telenet goto Connect_Telenet;
if %Network = Tymnet goto Connect_Tymnet;
if %Network = DataPac goto Connect_DataPac;
if %Network = InfoNet_Europe goto Connect_InfoNet_Europe;
if %Network = InfoNet_World goto Connect_InfoNet_World;
if %Network = LATA goto Connect_LATA;
if %Network = CTLATA goto Connect_CTLATA;
if %Network = Telepac goto Connect_Telepac;
if %Network = Datex_P goto Connect_Datex_P;
if %Network = Datex_J goto Connect_Datex_J;
if %Network = Dialplus goto Connect_Dialplus;
if %Network = NIF goto Connect_NIF;
if %Network = CompuPass goto Connect_CompuPass;
if %Network = FALNET goto Connect_FALNET;
if %Network = Mercury goto Connect_Mercury;
if %Network = CSIRnet goto Connect_CSIRnet;
if %Network = ISRAKAV goto Connect_ISRAKAV;
if %Network = Transpac goto Connect_Transpac;
if %Network = AlaskaNet goto Connect_AlaskaNet;
if %Network = PacNet goto Connect_PacNet;
if %Network = TTNNet goto Connect_TTNNet;
if %Network = FENICSII goto Connect_FENICSII;
if %Network = Datapak goto Connect_Datapak;
if %Network = VNZNET goto Connect_CIS;
define %FailureMsg = "Network not supported";
goto Connect_Fatal;
!
! Connect to Telenet
!
Connect_Telenet:
call %Dir & "telenet.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to Tymnet
!
Connect_Tymnet:
call %Dir & "tymnet.scr" (1) : Result;
goto Handle_Network_Return;
!
! Connect to DataPac
!
Connect_DataPac:
call %Dir & "datapac.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet Europe
!
Connect_InfoNet_Europe:
call %Dir & "infonet.scr" (%TRUE) : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet World
!
Connect_InfoNet_World:
call %Dir & "infonet.scr" (%FALSE) : Result;
goto Handle_Network_Return;
!
! Connect to LATA
!
Connect_LATA:
call %Dir & "lata.scr" (%TRUE) : Result;
goto Handle_Network_Return;
!
! Connect to Connecticut LATA
!
Connect_CTLATA:
call %Dir & "lata.scr" (%FALSE) : Result;
goto Handle_Network_Return;
!
! Connect to Telepac
!
Connect_Telepac:
call %Dir & "telepac.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to Datex-P
!
Connect_Datex_P:
call %Dir & "datexp.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to Datex-J
!
Connect_Datex_J:
call %Dir & "datexj.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to Dialplus
!
Connect_Dialplus:
call %Dir & "dialplus.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to NIF
!
Connect_NIF:
call %Dir & "fenics.scr" (%TRUE) : Result;
goto Handle_Network_Return;
!
! Connect to CompuPass
!
Connect_CompuPass:
call %Dir & "fenics.scr" (%FALSE) : Result;
goto Handle_Network_Return;
!
! Connect to FALNET
!
Connect_FALNET:
call %Dir & "falnet.scr" (%FALSE) : Result;
goto Handle_Network_Return;
!
! Connect to Mercury
!
Connect_Mercury:
call %Dir & "mercury.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to CSIR-Net
!
Connect_CSIRnet:
call %Dir & "csirnet.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to ISRAKAV
!
Connect_ISRAKAV:
call %Dir & "israkav.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to Transpac
!
Connect_Transpac:
call %Dir & "transpac.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to AlaskaNet
!
Connect_AlaskaNet:
call %Dir & "tymnet.scr" (2) : Result;
goto Handle_Network_Return;
!
! Connect to PacNet
!
Connect_PacNet:
call %Dir & "tymnet.scr" (3) : Result;
goto Handle_Network_Return;
!
! Connect to TTN-Net
!
Connect_TTNNet:
call %Dir & "ttnnet.scr" (3) : Result;
goto Handle_Network_Return;
!
! Connect to FENICS II
!
Connect_FENICSII:
call %Dir & "fenics2.scr" (3) : Result;
goto Handle_Network_Return;
!
! Connect to Datapak
!
Connect_Datapak:
call %Dir & "datapak.scr" (3) : Result;
goto Handle_Network_Return;
!
! Handle Network Return
!
Handle_Network_Return:
if Result = %Success goto Do_CIS_Script;
if Result = %Cancel goto Cancel_Connect;
if Result = %Fatal goto Connect_Fatal;
goto Connect_Failure;
!
! Connect to CIS
!
Connect_CIS:
CISNetwork = %TRUE;
send %CR;
Do_CIS_Script:
call %Dir & "cserve.scr" (DirectConnect, CISNetwork) : Result;
if Result = %Failure goto Connect_Failure;
if Result = %Cancel goto Cancel_Connect;
if Result = %Fatal goto Connect_Fatal;
exit %Success;
Connect_Failure:
gosub Hangup_Connect;
reset;
exit %Failure;
Connect_Fatal:
gosub Hangup_Connect;
reset;
exit %Fatal;
Hangup_Connect:
if not UsingModem goto Hangup_Done;
ifndef %LOCAL = 1;
call %Dir & "disconct.scr" ();
Hangup_Done:
return;
Cancel_Connect:
show "Connect cancelled";
gosub Hangup_Connect;
reset;
exit %Cancel;